<div class="row">
    <div class="col-md-12">
        <!-- Custom Tabs -->
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab_1" data-toggle="tab">Flavors</a></li>
                <li class="pull-right">&nbsp;</li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="tab_1">
                    <div class="box box-solid">
                        <div class="box-body no-padding">
                            <table class="table">
                              <tbody>
                                  <tr>
                                      <th><?php echo $this->Paginator->sort('title',__('Title')); ?></th>
                                      <th>Category</th>
                                      <th>Flavor Name</th>
                                      <th>Bitrate</th>
                                      <th>Video Bitrate</th>
                                      <th>Resolution</th>
                                      <th><?php echo $this->Paginator->sort('created','Publish Date'); ?></th>
                                      <th>Completed Time</th>
                                      <th><?php echo $this->Paginator->sort('status','Status'); ?></th>
                                  </tr>
                                    <?php
                                        foreach($data as $key=>$val){ //echo '<pre>';print_r($val);echo '</pre>';
                                            echo '<tr>';
                                            echo sprintf('<td>%s</td>',$val['Content']['title']);
                                            echo sprintf('<td>%s</td>',$val['Category']['category'] != '' ? $val['Category']['category'] : '--');
                                            echo sprintf('<td>%s</td>',$val['Flavor']['flavor_name']);
                                            echo sprintf('<td>%s</td>',$val['Flavor']['bitrate']);
                                            echo sprintf('<td>%s</td>',$val['Flavor']['video_bitrate']);
                                            echo sprintf('<td>%s</td>',$val['Flavor']['width'].'*'.$val['Flavor']['height']);
                                            echo sprintf('<td>%s</td>',date(Configure::read('date_format'),strtotime($val['VideoFlavor']['created'])));
                                            echo sprintf('<td>%s</td>',$val['VideoFlavor']['status'] == 'completed' ? date(Configure::read('date_format'),strtotime($val['VideoFlavor']['modified'])) : '--');
                                            switch($val['VideoFlavor']['status']){
                                                case 'inprocess' :
                                                    echo '<td><span class="label label-warning">In process</span></td>';
                                                    break;
                                            }
                                            echo '</tr>';
                                        }
                                    ?>
                              </tbody>
                          </table>
                        </div><!-- /.box-body -->
                        <div class="box-footer clearfix">
                            <?php
                                $pagination = $this->Paginator->params();
                                $this->Paginator->options(array('update'=>'#content','evalScripts'=>true,'data'=>http_build_query($this->request->data),'method'=>'POST'));
                                if($pagination['pageCount'] > 1){
                            ?>
                            <!-- Pagination start --->
                            <ul class="pagination pagination-sm no-margin pull-right">
                                <?php
                                echo $this->Paginator->prev('← '.__('Previous'),array('tag' => 'li','escape' => false),'<a href="javascript:void(0)">← '.__('Previous').'</a>',array('class' => 'prev disabled','tag' => 'li','escape' => false)); 
                                echo $this->Paginator->numbers(array('currentClass'=>'active','separator'=>false,'currentTag'=>'a','tag' => 'li','escape' => false,'modulus'=>3));
                                echo $this->Paginator->next(__('Next').' →',array('tag' => 'li'),'<a href="javascript:void(0)">'.__('Next').' → </a>',array('class' => 'next disabled','tag' => 'li','escape' => false));
                                ?>
                            </ul>
                            <!-- Pagination end -->
                            <?php echo $this->Js->writeBuffer(); ?>
                            <?php } ?>
                        </div>
                    </div><!-- /.box -->
                </div>
                <div class="tab-pane" id="tab_2">
                    blank.......
                </div>
            </div><!-- /.tab-content -->
        </div><!-- nav-tabs-custom -->
    </div><!-- /.col -->
</div> <!-- /.row -->